import Vue from 'vue'
import VueRouter from 'vue-router'

import UserLogin from "@/views/Login";
import AdminMain from "@/views/AdminMain";
import error from "@/views/404"
import Index from "@/views/Index";
import pageVideo from "@/views/PageVideo";
import pageTopic from "@/views/PageTopic";

Vue.use(VueRouter)

const routes = [

    {
        path: '/',
        name: 'userLogin',
        component: UserLogin
    },

    {
        path: '/admin/main',
        name: 'AdminMain',
        component: AdminMain,
    },
    {
        path: '*',
        component: error,
        meta: {title: '资源不存在'}
    },
    {
        path: '/index',
        component: Index,
    },
    {
        path: '/index/pageVideo',
        component: pageVideo,
    },
    {
        path: '/index/pageTopic',
        component: pageTopic,

    },


];

const router = new VueRouter({
    routes
})

export default router
